<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<div class="middle_right_content" >
<div class="middle_right_content_newstop"><span class="middle_right_content_top_titletext">问卷调查 <span style="color:#888888">Vote</span></span></div>
  <div class="middle_right_content_inquiry"  style="float:left">	   
  <ul>	
  <html:form action="/shop/vote.do" method="post" style="width:auto;height:auto;">	
  	<input type="hidden" name="method" value="add" /> 
  	  <logic:notEmpty name="vote" property="content">
  <li>
	                ${vote.content}           	               
	           </li>
	              
	              
	              <logic:notEmpty name="vote" property="ex1">
	              <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="1"></span><span  class="inquiry_select"> ${vote.ex1}</span>
				</li>
				  </logic:notEmpty>
	           	               
	          
	               <logic:notEmpty name="vote" property="ex2">
	             <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="2"></span><span  class="inquiry_select"> ${vote.ex2}</span>
				 </li>
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex3">
	             <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="3"></span><span  class="inquiry_select">${vote.ex3}</span>
				  </li>	
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex4">
	              <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="4"></span><span  class="inquiry_select"> ${vote.ex4}</span>
				  </li>
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex5">
	              <li>
	                <span  class="inquiry_button"><input type="radio" name="vote.completeCheckCircs" value="5"></span> <span  class="inquiry_select">${vote.ex5}</span>
				  </li>
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex6">
	               <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="6"></span> <span  class="inquiry_select"> ${vote.ex6}</span>
				  </li>	
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex7">
	              <li>
	               <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="7"></span> <span  class="inquiry_select"> ${vote.ex7}</span>
				  </li>
	               </logic:notEmpty>  
	                  <logic:notEmpty name="vote" property="ex8">
	              <li>
	               <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="8"></span><span  class="inquiry_select">  ${vote.ex8}</span>
				  </li>	
	               </logic:notEmpty>  
	               <logic:notEmpty name="vote" property="ex9">
	             <li>
	              <span  class="inquiry_button">  <input type="radio" name="vote.completeCheckCircs" value="9"></span><span  class="inquiry_select"> ${vote.ex9}</span>
				  </li>	
	               </logic:notEmpty>  
	               <logic:notEmpty name="vote" property="ex10">
	              <li>
	                <span  class="inquiry_button"><input type="radio" name="vote.completeCheckCircs" value="10"></span><span  class="inquiry_select"> ${vote.ex10}</span>
				  </li>	
	               </logic:notEmpty>  
	               <logic:notEmpty name="vote" property="ex11">
	              <li>
	              <span  class="inquiry_button"> <input type="radio" name="vote.completeCheckCircs" value="11"></span> <span  class="inquiry_select">${vote.ex11}</span>
				 </li>
	               </logic:notEmpty>  
	               <logic:notEmpty name="vote" property="ex12">
	              <li>
	               <span  class="inquiry_button"><input type="radio" name="vote.completeCheckCircs" value="12"></span> <span  class="inquiry_select"> ${vote.ex12}</span>
				  </li>	
	               </logic:notEmpty>  
	               <li style="text-align:center">
	               <input type="hidden" name="vote.id" value="${vote.id}">
	              
	               <input type="submit" value="提交" onclick="return check(1);"/>	            	
					<input type="button" value="查看" onclick="votesub(1);"/>	
				
	               </li>
	               	</logic:notEmpty>
	      </html:form>   </ul>      	       
	</div>
	<form action="${ctx}/shop/vote.do?method=voteView" method="post" name="voteView" style="height:0;width:0;padding:0;margin:0;border:0;line-height:0;">
	</form> 
 <div class="middle_right_content_bottom"></div></div>
<script language="javascript" type="text/javascript">
	function votesub(id){
		 //window.open(jsCtx+'/voteView.jsp?productId='+id,'','height=200,width=400,top=300, left=500,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no');
		 window.open(jsCtx+'/shop/vote.do?method=voteView&productId='+id,'','height=200,width=400,top=300, left=500,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no');
	     //var form = document.getElementsByTagName("form")[2];
	     //form.submit();
	} 	

	function check(id){
	     var flag1=0;
		 var radio1=document.getElementsByName("vote.completeCheckCircs");
		 
		 for(var i=0;i<radio1.length;i++){
	        if(radio1.item(i).checked==true){
			      flag1=1;                
		    }
		 }
		 if(flag1==0){
             alert("请选择一项");
             return false;
         }else{
         	  window.open(jsCtx+'/addVoteSuccess.jsp?productId='+id,'','height=200,width=400,top=300, left=500,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no');
              return true;
	     }
	} 
</script> 
